//
//  PersonOfTheYearTableViewCell.m
//  ChineseCollegeStudentsNetwork
//
//  Created by 刘喆 on 2018/5/27.
//  Copyright © 2018年 刘喆. All rights reserved.
//

#import "PersonOfTheYearTableViewCell.h"

@implementation PersonOfTheYearTableViewCell

#pragma mark - Init
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createSubviews];
    }
    return self;
}

#pragma mark - Subviews
#pragma amrk layout subviews
- (void)layoutSubviewsInView {
    
    [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.offset(12);
    }];
    
    [_timeLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.right.offset(-12);
    }];

    [_contentLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-100);
        make.left.offset(12);
        make.centerY.equalTo(self.timeLbl);
    }];
}

#pragma mark create subviews
- (void)createSubviews {
    [self.contentView addSubview:self.titleLbl];
    [self.contentView addSubview:self.timeLbl];
    [self.contentView addSubview:self.contentLbl];

    [self layoutSubviewsInView];
}

- (UILabel *)contentLbl {
    if (!_contentLbl) {
        _contentLbl = [[UILabel alloc] init];
        _contentLbl.textColor = kRGB(153, 153, 153, 1);
        _contentLbl.font = [UIFont systemFontOfSize:14];
    }
    return _contentLbl;
}

- (UILabel *)titleLbl {
    if (!_titleLbl) {
        _titleLbl = [[UILabel alloc] init];
        _titleLbl.font = [UIFont systemFontOfSize:17];

    }
    return _titleLbl;
}

- (UILabel *)timeLbl {
    if (!_timeLbl) {
        _timeLbl = [[UILabel alloc] init];
        _timeLbl.textColor = kRGB(153, 153, 153, 1);
        _timeLbl.font = [UIFont systemFontOfSize:14];

    }
    return _timeLbl;
    
}



@end
